<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link type="text/css" rel="stylesheet" href="__PUBLIC__/web/css/lib.css?2">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta content="telephone=no" name="format-detection">
    <title>My trade</title>
    <meta name="Keywords" content="PAAM" />
    <meta name="Description" content="PAAM" />
    <script src="__PUBLIC__/web/js/jquery-1.8.3.min.js"></script>
    <link rel="stylesheet" href="__PUBLIC__/web/css/weui.min.css"/>
    <link rel="stylesheet" href="__PUBLIC__/web/css/jquery-weui.min.css">
    <script src="__PUBLIC__/web/js/layer.js"></script>
    <link href="__PUBLIC__/web/css/font-awesome.min.css" rel="stylesheet">
    <link href="__PUBLIC__/web/fonts/iconfont.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/web/css/style.css"/>
	
	<script src="__PUBLIC__/web/js/ajaxUplod.js"></script>
</head>
<body>
<!--顶部开始-->
<div class="header">
    <span class="header_l"><a href="javascript:history.go(-1);"><i class="fa fa-chevron-left"></i></a></span>
    <span class="header_c">My trade</span>
	<span style="position: absolute;right: 10%;top: 0px;text-align:center;width:20%;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;font-size: 12px; ">{$userData['ue_truename']}</span>
    <span class="header_r"><a href="/index.php/Home/Index/enindex"><i class="fa fa-user"></i></a></span>
</div>
<div class="height40"></div>
<!--顶部结束-->
<!--矿车列表-->
<div style="width: 90%;margin-left: 5%;margin-top: 20px;overflow:hidden;border-radius:5px">
    <p id="qiugoubg"onclick='showhidediv("qiugou")'style="float: left;width: 25%;text-align: center;background-color: #fff;height: 30px;line-height: 30px;">List wanted</p>
    <p id="chushoubg"onclick='showhidediv("chushou")'style="float: left;width: 25%;text-align: center;background-color: #05B6A3;height: 30px;line-height: 30px;color:#fff">Sale list</p>
    <p id="zzjybg" onclick='showhidediv("zzjy")'style="float: left;width: 25%;text-align: center;background-color: #05B6A3;;height: 30px;line-height: 30px;color:#fff">Transaction list</p>
    <p id="ywcjybg" onclick='showhidediv("ywcjy")'style="float: left;width: 25%;text-align: center;background-color: #05B6A3;;height: 30px;line-height: 30px;color:#fff">Completed list</p>
</div>
<div id="qiugou" style="-left: 5%;margin-bottom:80px;margin-top:30px">
        <ul class="myjy_head"style="font-weight: 700;width:100%;margin-left:0%;margin-top:-5px">
            <li style="width: 18%">nickname</li>
            <li style="width: 24%">Number(GEC)</li>
            <li style="width: 20%">Price($)</li>
            <li style="width: 20%">Whether to cancel</li>
            <li style="width: 18%">state</li>
        </ul>
    <div>
	<foreach name="list" item = "v">
        <ul class="myjy_body"style="width:100%;margin-left:0%;margin-top:10px">
            <li style="width: 18%;height: 30px;overflow: hidden;display: inline-block">{$v.p_name}</li>
            <li style="width: 24%;">{$v.lkb}</li>
            <li style="width: 20%;"class="money">{$v.jb}</li>
            <li style="width: 20%;"><a href="/index.php/Home/Info/endelqiugou/?id={$v.id}" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">cancel</a></li>
            <li style="width: 18%;">
                <if condition = "$v.zt eq 0">
                <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">No transaction</a>
                </if>
                <if condition = "$v.zt eq 1">
                <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">Transaction</a>
                </if>
                <if condition = "$v.zt eq 2">
                <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">Transaction completion</a>
                </if>
            </li>
        </ul>
	</foreach>	
    </div>
 </div>
<div id="chushou" style="-left: 5%;margin-bottom:80px;margin-top:30px;display: none;width: 90%; margin-left: 5%;">
    <ul class="myjy_head"style="font-weight: 700;width:100%;margin-left:0%;margin-top:-5px;">
        <li style="width: 18%">nickname</li>
        <li style="width: 24%">Number(GEC)</li>
        <li style="width: 20%">Price($)</li>
        <li style="width: 20%">Whether to cancel</li>
        <li style="width: 18%">state</li>
    </ul>
    <div>
        <foreach name="cslkb" item = "v">
            <ul class="myjy_body"style="width:100%;margin-left:0%;margin-top:10px">
                <li style="width: 18%;height: 30px;overflow: hidden;display: inline-block">{$v.p_name}</li>
                <li style="width: 24%;">{$v.lkb}</li>
                <li style="width: 20%;"class="money">{$v.jb}</li>
                <li style="width: 20%;"><a href="/index.php/Home/Info/endel/?id={$v.id}" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">cancel</a></li>
                <li style="width: 18%;">
                    <if condition = "$v.zt eq 0">
                        <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">No transaction</a>
                    </if>
                    <if condition = "$v.zt eq 1">
                        <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">Transaction</a>
                    </if>
                    <if condition = "$v.zt eq 2">
                        <a href="#" style="width: 90%;margin-left: 5%;display: block;height: 30px;line-height: 30px;text-align: center;background-color: #05B6A3;border-radius: 5px;color: #FFFFFF">Transaction completion</a>
                    </if>
                </li>
            </ul>
        </foreach>
    </div>
</div>
<div id="zzjy" style="display:none;margin-bottom:80px;">
    <div>
	
        <ul class="myjy_head"style="font-weight: 700">
            <li style="width: 10%">operation</li>
            <li style="width: 25%">nickname</li>
            <li style="width: 10%">Grade</li>
            <li style="width: 35%">GEC</li>
            <li style="width: 20%">Price($)</li>
        </ul>
    </div>
    <div class="myjiaoyi_list">
	<foreach name='lists' item='v'>
        <ul class="myjy_body">
            <li style="width: 10%;"><input type="radio" name="xz" class="xz"checked value="{$v.id}" for="xxx"/></li>
            <li style="width: 25%;height: 30px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;">{$v.p_name}</li>
            <li class=" iconfont" style="width: 10%;" >
					<if condition = "$v.p_level eq 0">&#xe667;</if>
					<if condition = "$v.p_level eq 1">&#xe668;</if>
					<if condition = "$v.p_level eq 2">&#xe669;</if>
					<if condition = "$v.p_level eq 3">&#xe66a;</if>
					<if condition = "$v.p_level eq 4">&#xe64f;</if>
					<if condition = "$v.p_level eq 5">&#xe66c;</if>
					<if condition = "$v.p_level eq 6">&#xe66d;</if>
				
			</li>
            <li style="width: 35%">{$v.lkb}</li>
            <li style="width: 20%"class="money">{$v.jb}</li>
        </ul>
     </foreach>
	 
	
	 <!-- <if condition = "$datatype eq 'cslkb'">
        <ul class="myjy_tj";style="margin-bottom:80px">
			<if condition = "$v.p_user eq $_SESSION['uname']">
            <li style="position: relative;">
			<div class="pic_show single">
							<if condition = "$tp eq 2">
                            <button type="button" name="IconPath" class="upload_one fl" id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">上传图片</button>
							 </if>
							 <if condition = "$tp eq 1">
							 <button type="button" name="IconPath" class="upload_one fl" id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">已经上传</button>
							</if>
						  <div class="show_box fr single">

                                <ul id="lst_photo_other">

									<li>

									</li>

                                </ul>

                            </div>

                        </div>
				
				</li>

			</if>
		
			<if condition = "$v.g_user eq $_SESSION['uname']">
            <li><input type="button" class="ckpicture" value="查看图片" data-pic="请输入图片地址" style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;  -webkit-appearance: none;"/></li></if>
            <if condition = "$v.p_user eq $_SESSION['uname']">
			<li class="bl2"<a><button class="btnmaijia"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">卖家信息</button></a></li>
			</if>
			<if condition = "$v.g_user eq $_SESSION['uname']">
			<li class="bl2"><a><button class="btnmai"style=" width: 100%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">买家信息</button></a></li>
			</if>
			<if condition = "$ts eq 0">
			<li class="bl2">
             <button class="btntoushu"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">投诉<input class="tsid" type="hidden" value="1"/></button>
			</li>
			</if>
            <if condition = "$v.p_user eq $_SESSION['uname']">
			<li class="bl2"style="background-color:#ddd"><a href="#" class="quxiao"style="background-color:#ddd">取消交易</a></li>
			</if>
			<if condition = "$v.g_user eq $_SESSION['uname']">
            <li class="bl3" style="background-color:#ddd"><a href="#" class="wancheng" style="background-color:#ddd">完成交易</a></li>
			</if>
			
        </ul>
	</if> -->
		<!-- 求购莱肯币菜单显示 -->
		<?php
			if($datatype=='qglkb'){
		
		?>
		<ul class="myjy_tj";style="margin-bottom:80px">
			<if condition = "$v.p_user eq $_SESSION['uname']">
            <li style="position: relative;">
			<div class="pic_show single">
							<if condition = "$tp eq 2">
                            <button type="button" name="IconPath" class="upload_one fl" id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">Upload pictures</button>
							 </if>
							 <if condition = "$tp eq 1">
							 <button type="button" name="IconPath"  id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">Already uploaded</button>
							</if>
						  <div class="show_box fr single">

                                <ul id="lst_photo_other">

									<li>

									</li>

                                </ul>

                            </div>

                        </div>
				
				</li>

			</if>
		
			<if condition = "$v.g_user eq $_SESSION['uname']">
            <li><input type="button" class="ckpicture" value="view picture" data-pic="Please enter a picture address" style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;  -webkit-appearance: none;"/></li></if>
            <if condition = "$v.p_user eq $_SESSION['uname']">
			<li class="bl2"<a><button class="btnmaijia"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Other information</button></a></li>
			</if>
			<if condition = "$v.g_user eq $_SESSION['uname']">
			<li class="bl2"><a><button class="btnmai"style=" width: 100%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Other information</button></a></li>
			</if>
			<if condition = "$ts eq 0">
			<li class="bl2">
             <button class="btntoushu"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Complaint<input class="tsid" type="hidden" value="1"/></button>
			</li>
			</if>
            <if condition = "$v.p_user eq $_SESSION['uname']">
			<li class="bl2"style="background-color:#ddd"><a href="#" class="quxiao"style="background-color:#ddd">Cancel transaction</a></li>
			</if>
			<if condition = "$v.g_user eq $_SESSION['uname']">
            <li class="bl3" style="background-color:#ddd"><a href="#" class="wancheng" style="background-color:#ddd">Complete transaction</a></li>
			</if>
			
        </ul>
		<?php }?>
		
		<!-- 出售莱肯币显示菜单 -->
		<?php
			if($datatype=='cslkb'){
			?>
		
		<ul class="myjy_tj";style="margin-bottom:80px">
		
            <li style="position: relative;">
			<div class="pic_show single">
							<if condition = "$v.g_user eq $_SESSION['uname']">
							<if condition = "$tp eq 2">
                            <button type="button" name="IconPath" class="upload_one fl" id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">Upload pictures</button>
							</if>
							 <if condition = "$tp eq 1">
							 <button type="button" name="IconPath"  id="photo_other"style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;">Already uploaded</button>
							</if>
						</if>	
						  <div class="show_box fr single">

                                <ul id="lst_photo_other">

									<li>

									</li>

                                </ul>

                            </div>

                        </div>
				
				</li>

		<if condition = "$v.p_user eq $_SESSION['uname']">
			
            <li><input type="button" class="ckpicture" value="view picture" data-pic="Please enter a picture address" style="font-size:14px; width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;  -webkit-appearance: none;"/></li>
        </if>   
		
		<if condition = "$v.g_user eq $_SESSION['uname']">
			<li class="bl2"<a><button class="btnmai"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Other information</button></a></li>
			
		</if> 	
		<if condition = "$v.p_user eq $_SESSION['uname']">
			<li class="bl2"><a><button class="btnmaijia"style=" width: 100%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Other information</button></a></li>
		</if> 	
			
			<li class="bl2">
             <button class="btntoushu"style=" width: 95%;height: 30px;border:0px;border-radius: 5px;background-color: #ddd;display: block;line-height: 30px;color: #000000;font-size:14px;">Complaint<input class="tsid" type="hidden" value="1"/></button>
			</li>
			
           <if condition = "$v.g_user eq $_SESSION['uname']">
			<li class="bl2"style="background-color:#ddd"><a href="#" class="csquxiao"style="background-color:#ddd">Cancel transaction</a></li>
		</if>
			<if condition = "$v.p_user eq $_SESSION['uname']">
            <li class="bl3" style="background-color:#ddd"><a href="#" class="cswancheng" style="background-color:#ddd">Complete transaction</a></li>
		</if>
			
        </ul>
		
	<?php }?>
    </div>
</div>
<div id="ywcjy"style="display: none;margin-bottom:80px;margin-top:-50px">
    <table class="jyzx_list" style="margin-top:60px;border-collapse:collapse;width:90%;margin-left:5%">
        <thead>
        <tr style="width:100%;background-color:#eee;">
            <th style="padding:10px 0">nickname</th>
            <th style="padding:10px 0">Grade</th>
            <th style="padding:10px 0">GEC</th>
            <th style="padding:10px 0">Price($)</th>
          
        </tr>
        </thead>
        <tbody >
		 <foreach name='oob' item='s'>
        <tr>
            <td style="height:30px;line-height:30px;padding-left:10px;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space: nowrap;">{$s.p_name}</td>
            <td style="height:30px;line-height:30px;text-align:center; "class=" iconfont">
			
					<if condition = "$s.p_level eq 0">&#xe667;</if>
					<if condition = "$s.p_level eq 1">&#xe668;</if>
					<if condition = "$s.p_level eq 2">&#xe669;</if>
					<if condition = "$s.p_level eq 3">&#xe66a;</if>
					<if condition = "$s.p_level eq 4">&#xe64f;</if>
					<if condition = "$s.p_level eq 5">&#xe66c;</if>
					<if condition = "$s.p_level eq 6">&#xe66d;</if>
			
			</td>
            <td style="height:30px;line-height:30px;text-align:center;">{$s.lkb}</td>
            <td style="height:30px;line-height:30px;text-align:center;">{$s.jb}</td>
            
        </tr>
		</foreach>
       <!--  <tr>
            <td style="padding:10px 0;text-align:center;">三九</td>
            <td style="padding:10px 0;text-align:center;">V3</td>
            <td style="padding:10px 0;text-align:center;">100.0001</td>
            <td style="padding:10px 0;text-align:center;">100.00</td>
            <td style="padding:5px 0;text-align:center;"><a href="#" style="background-color:#E64340;width: 100%;height: 100% ;border: 0px;border-radius: 5px;width: 40px;height: 25px;display: block;line-height: 25px;color: #fff">删除</a></td>
        </tr> -->
        </tbody>
    </table>
</div>
<!--底部开始-->
<style>
    .footer ul li{
        width: 25%;
    }
</style>
<div class="footer">
        <ul>
            <li><a href="/index.php/Shop/Index/enIndex" class="block"><i class="iconfont">&#xe604;</i>Mills Mall</a></li>
			 <li><a href="/index.php/Home/Info/enmykuangche/" class="block"><i class="iconfont">&#xe601;</i>My mine</a></li>
            <li><a href="/index.php/Home/Info/enIndex" class="block"><i class="iconfont">&#xe645;</i>Trading center</a></li>
            <li style="width:24%"><a href="/index.php/Home/Index/enindex" class="block"><i class="iconfont">&#xe684;</i>Personal Center</a></li>
        </ul>
    </div>
<script>
    document.getElementById('photo').addEventListener('change',function(e){
        var files = this.files;
        var img = new Image();
        var reader = new FileReader();
        reader.readAsDataURL(files[0]);
        reader.onload = function(e){
            var mb = (e.total/1024)/1024;
            if(mb>= 2){
                alert('File size is greater than2M');
                return;
            }
            img.src = this.result;
            img.style.height="100%";
            document.getElementById('click').innerHTML = '';
            document.getElementById('click').appendChild(img);
            $(".div1").css({"background":"#FFF"});
            $(".div2").html("<span style='float:right;margin-right:5px;color:#e4393c;'>Success</span>")
        }
    });
</script>
<!--底部结束-->
<script src="__PUBLIC__/web/js/jquery-weui.min.en.js"></script>

<script>
     function showhidediv(id) {
        console.log(id);
        var qiugou = document.getElementById("qiugou");
        var chushou=document.getElementById("chushou");
        var zhengzai = document.getElementById("zzjy");
        var wancheng = document.getElementById('ywcjy');
        var qiugoubg = document.getElementById("qiugoubg");
        var chushoubg=document.getElementById("chushoubg");
        var zhengzaibg = document.getElementById('zzjybg');
        var wancehngbg = document.getElementById('ywcjybg');
        if (id == "zzjy") {
            wancheng.style.display = 'none';
            zhengzai.style.display = 'block';
            qiugou.style.display = 'none';
            chushou.style.display = 'none';
            qiugoubg.style.backgroundColor = "#05B6A3"
			qiugoubg.style.color = "#fff"
            chushoubg.style.backgroundColor = "#05B6A3"
            chushoubg.style.color = "#fff"
            zhengzaibg.style.backgroundColor = "#fff";
			zhengzaibg.style.color = "#000";
            wancehngbg.style.backgroundColor = "#05B6A3";
			wancehngbg.style.color = "#fff";
        }else if (id =='chushou') {
            zhengzai.style.display = 'none';
            wancheng.style.display = 'none';
            qiugou.style.display = 'none';
            chushou.style.display='block';
            chushoubg.style.backgroundColor = "#fff";
            qiugoubg.style.backgroundColor = "#05B6A3";
            zhengzaibg.style.backgroundColor = "#05B6A3";
            wancehngbg.style.backgroundColor = "#05B6A3";
            qiugoubg.style.color= "#fff"
            zhengzaibg.style.color = "#fff";
            wancehngbg.style.color = "#fff";
            chushoubg.style.color = "#000";
        }else if (id =='ywcjy') {
                zhengzai.style.display = 'none';
                wancheng.style.display = 'block';
                qiugou.style.display = 'none';
                chushou.style.display = 'none';
                qiugoubg.style.backgroundColor = "#05B6A3"
                chushoubg.style.backgroundColor = "#05B6A3"
                zhengzaibg.style.backgroundColor = "#05B6A3";
				qiugoubg.style.color= "#fff"
				chushoubg.style.color= "#fff"
                zhengzaibg.style.color = "#fff";
                wancehngbg.style.backgroundColor = "#fff";
				wancehngbg.style.color = "#000";
            }else if(id=='qiugou'){
                chushou.style.display='none';
                zhengzai.style.display = 'none';
                wancheng.style.display = 'none';
                qiugou.style.display = 'block';
                qiugoubg.style.backgroundColor = "#fff";
				qiugoubg.style.color = "#000";
                zhengzaibg.style.backgroundColor = "#05B6A3";
                chushoubg.style.backgroundColor = "#05B6A3";
                wancehngbg.style.backgroundColor = "#05B6A3";
				zhengzaibg.style.color = "#fff";
                wancehngbg.style.color = "#fff";
                chushoubg.style.color = "#fff";
                }
    }
</script>
<!--投诉-->
<script>
    $(".btntoushu").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.prompt("Please enter your complaint", function () {
                $.ajax({
                    url: "{:U('/index.php/Home/Info/entousu')}",
                    ype: "get",
                    data: {id: oid, txt: $("#weui-prompt-input").val()},
                    success: function (data) {
						console.log(data);
                        $.alert(data);
                    },
                    error: function () {
                        alert("Network error please try again");
                    }
                });
            })
        }
    })
</script>
<!--卖家信息-->
<script>
    $(".btnmaijia").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.ajax({
                url:"{:U('/index.php/Home/Info/mjxx')}",
                type: "get",
                data: {id: oid, txt: $("#weui-prompt-input").val()},
                success: function (data) {
				console.log(data);
                    $.modal({
						title: data.name,
                        text: "<div style='text-align:left'>USD："+data.meiyuan+"<br>"+"BTC："+data.btc+"<br>"+"Nickname："+data.ue_truename+"<br>"+"Nationality："+data.area+"<br>"+"phone："+data.ue_account+"<br>"+"BTC wallet："+data.btcaddress+"<br>"+"Name："+data.zhxm+"<br>"+"Bank："+data.yhmc+"<br>"+"Bank card："+data.yhzh+"</div>",
                        buttons:[
                            { text: "Determine", className: "default", onClick: function(){ } },
                        ]
                    })
                },
                error: function () {
                    $.alert("Network error please try again");
                }
            });
            }
    })
</script>
<!--买家信息-->
<script>
    $(".btnmai").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.ajax({
                url:"{:U('/index.php/Home/Info/maijia')}",
                type: "get",
                data: {id: oid, txt: $("#weui-prompt-input").val()},
                success: function (data) {
				console.log(data);
                    $.modal({
                        title: data.name,
                        text: "<div style='text-align:left'>USD："+data.meiyuan+"<br/>"+"BTC："+data.btc+"<br>"+"Nickname："+data.ue_truename+"<br>"+"Nationality："+data.area+"<br>"+"phone："+data.ue_account+"<br>"+"BTC wallet："+data.btcaddress+"<br>"+"Name："+data.zhxm+"<br>"+"Bank："+data.yhmc+"<br>"+"Bank card："+data.yhzh+"</div>",
                        buttons:[
                            { text: "Determine", className: "default", onClick: function(){ } },
                        ]
                    })
                },
                error: function () {
                    $.alert("Network error please try again");
                }
            });
            }
    })
</script>
<script>
    $(function(){
		$(".money").bind("click",function(){
			var huilv=$(this).html();
			$("#UpBox").fadeOut();
			$.ajax({
				url:"{:U('/index.php/Home/Info/huilv')}",
				type:"get",
				data:{id:$("#UpBox").find(".opid").val(),huilv:huilv},
				dataType:"json",
				success:function(data){
				console.log(data);
					$.modal({
                        title: data.name,
                        text: "USD："+huilv+"<br>"+"BTC："+data.btc,
                        buttons:[
                            { text: "确定", className: "default", onClick: function(){ } },
                        ]
                    })
				},
				error:function(){
					$.alert("网络错误请重试");
				}
			})
		})
		$("#firmBtnFalse").bind("click",function(){
			$("#UpBox").fadeOut();
		})
		})
</script>
<!--图片-->
<script>
    $(".ckpicture").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.ajax({
                url:"{:U('/index.php/Home/Info/cktp')}",
                type: "get",
                data: {id: oid},
                success: function (data) {
				  $.modal({
                        title:"",
                        text: "<img src=\"/Uploads/"+data+"\" width='60%'>",
                        buttons:[
                            { text: "Determine", className: "default", onClick: function(){ } },
                        ]
                    })
                },
                error: function () {
                    $.alert("Network error please try again");
                }
            });
        }
    })
    $(".quxiao").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.confirm("Are you sure you want to cancel the order？",function(){
                $.ajax({
                    url:"{:U('/index.php/Home/Info/enqxdd')}",
                    type: "get",
                    data: {id: oid},
                    success: function (data) {
						console.log(data);
                        $.alert(data);
						location.href ="/index.php/Home/Info/enmyjiaoyi/";
                    },
                    error: function () {
                        $.alert("Network error please try again");
                    }
                });
            })
        }
    })
	//出售取消
	 $(".csquxiao").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.confirm("Are you sure you want to cancel the order？",function(){
                $.ajax({
                    url:"{:U('/index.php/Home/Info/encsqx')}",
                    type: "get",
                    data: {id: oid},
                    success: function (data) {
						console.log(data);
                        $.alert(data);
						location.href ="/index.php/Home/Info/myjiaoyi/";
                    },
                    error: function () {
                        $.alert("Network error please try again");
                    }
                });
            })
        }
    })
	
	
    $(".wancheng").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.confirm("Are you sure you want to complete the order？",function(){
                $.ajax({
                    url:"{:U('/index.php/Home/Info/enwancheng')}",
                    type: "get",
                    data: {id: oid},
                    success: function (data) {
					dataType:"json",
					console.log(data.msg);
                        if (data.status == 1) {
                            $.alert(data.msg, function () {
                                location.href ="/index.php/Home/Info/enmyjiaoyi/";
                            });
                        } else {

                        $.alert(data);
                    }
                    },
                    error: function() {
                        $.alert("Network error please try again");
                    }
                });
            })
        }
    })
	
	
	//出售订单完成
	$(".cswancheng").bind("click",function() {
        var oid="";
        $(".xz").map(function(index,item){
            if($(this).is(":checked")){
                oid=$(this).val();
            }
        })
        if(oid==""){
            $.alert("Please select the order you want to operate");
        }else {
            $.confirm("Are you sure you want to complete the order？",function(){
                $.ajax({
                    url:"{:U('/index.php/Home/Info/encswancheng')}",
                    type: "get",
                    data: {id: oid},
                    success: function (data) {
					dataType:"json",
					console.log(data.msg);
                        if (data.status == 1) {
                            $.alert(data.msg, function () {
                                location.href ="/index.php/Home/Info/enmyjiaoyi/";
                            });
                        } else {

                        $.alert(data);
                    }
                    },
                    error: function() {
                        $.alert("Network error please try again");
                    }
                });
            })
        }
    })
</script>
<!--取消交易-->

</body>
</html>